-
-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
custom luadoc generation #2821
custom luadoc generation #2821
Conversation
off topicI noticed your force pushes just now, haha 😂 Here is what I would do if I were in your situation 👀 Actually your original pr contains three commits:
What we want to achieve:squash all 3 as one How to do soHere is one of the way
ps: btw I usually won't use |
Great work, thank you! |
File names in doc.json were broken since LuaLS#2821. See discussion LuaLS#2971.
Section luals.config was implemented in LuaLS#2562, but got lost after a major refactoring in LuaLS#2821. This commit reimplements it. See discussion LuaLS#2963.
File names in doc.json were broken since LuaLS#2821. See discussion LuaLS#2971.
File names in doc.json were broken since LuaLS#2821. See discussion LuaLS#2971.
Section luals.config was implemented in LuaLS#2562, but got lost after a major refactoring in LuaLS#2821. This commit reimplements it. See discussion LuaLS#2963.
Exposes Lua.docScriptPath as a config value, which should be a path that points to a user's documentation script. This script overrides /script/cli/doc/export.lua , which is used by the server to export docs.
Here is the API, all of which can be overriden by the userscript:
By default Lua.docScriptPath is "" and will execute the default documentation generation script at script/cli/doc/export.lua (with the above specified default behaviors).
For convenience, the script/vm/compiler.lua module now has a function vm.getSimpleClassFields, which can be used to get class fields without them recursing into other classes.
This has only been tested running the server manually with the --doc and --doc_out_path parameters, it has not been tested it by running it in VSC.
I made this because documentation was getting very unwieldy to generate, and saw doc sizes shrink by a factor of 10 when a custom documentation script was applied.
(had a minor crisis using git rebase, had to reset the branch entirely and submit another pr)